FROM swr.cn-south-1.myhuaweicloud.com/mindspore/mindspore-gpu-cuda11.1:1.5.0
RUN sed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list &&\
        sed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
RUN apt update && apt install openssh-server -y
RUN echo "PermitRootLogin yes" >> /etc/ssh/sshd_config &&\
        echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config &&\
        echo "AuthorizedKeysFile  .ssh/authorized_keys" >> /etc/ssh/sshd_config &&\
        /etc/init.d/ssh restart &&\
        mkdir -p ~/.ssh &&\
        echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCnpxlpVRAgCEHSW+OCdudD52n69y21W9rOa1bKfh9qB2dRFwSrSt7h+CMfLjlxOMAefWAjAGEeyxI4Okb6y6wcT9LQlCuxh/rYMfOWmyuvUwSt7IU8CvCm820lgkNeA0enzlE9RSqKdn8al1n2uVjMFrIKpJPX4vnPN5Oe3ivnyuXZA6IEwZN0pY4ojOAdaX0T826fDGtwTdSXmJe3s/GqCkWMXDLUxRMh752qQ64eobxtuFSrZ6i1L9uB1D3N83UeyIBnakU4uzrHGuZSgPEiMbpnnjmG2R+viBqYcFLsgwOv0Fr2TVzViNqey4U98NvnuUX/yt5CDoDcFDFjtU3EJfgHtPobSOwbp5aibuc4gEEzQqycAWTBbqwCYGP9GnP1LVDqw+56Si+UTeQtBaEH/nXYm1U7im+xStDasv6TGljjEvuYFZtiqrgGP6cQa/R+GqliokDlp42S4vHhKVUWpgTzlEZv063W2ByCUNvjS8V9SJa6cLtnhAubfPUmAVs= min@DESKTOP-7BOCHVM" > ~/.ssh/authorized_keys

ENTRYPOINT ["/usr/sbin/sshd", "-D"]
